<?php
namespace App\Http\Middleware;

use App\Library\Helper;
use Closure;

class CheckSgAble
{
    public function handle($request, Closure $next)
    {
        $hospitalId = $request->input('hospital_id');
        if (Helper::checkSgAble($hospitalId)) {
            return $next($request);
        }

        return response(['code' => -20000, 'message' => '没有权限']);
    }
}